<?php

include_once("../../php/include_all.php");
$code = $_GET['cde'];
if ($code == 'pro') {
    $idpro = $_GET[idpro];
    $program = get_datas("select * from mus_kegiatan WHERE id_program=$idpro");

    foreach ($program as $program) {
        $idkeg = $program['id_keg'];
        $namakeg = $program['nama_kegiatan'];
        echo "<div class='item_keg'><input type='radio' name='kegi' id='kegi' onclick='onclickKegiatan(this.value,$idpro)' value='$idkeg'>&nbsp;$namakeg</input></div>";
    }
}elseif ($code == 'text'){
    $idPro = $_GET['pro'];
    $keg = $_GET['kgt'];
    $nmPro = get_data("SELECT nama_program FROM mus_program where id_program = $idPro");
    $nmKeg = get_data("SELECT nama_kegiatan FROM mus_kegiatan where id_keg = $keg");
    echo $nmPro['nama_program']." | ".$nmKeg['nama_kegiatan'];
}
?>